package priv.lhy.constants;

import lombok.Data;

/**
 * author : lihy
 * date : 2019/1/30 13:17
 */
@Data
public class ServiceException extends RuntimeException {
    private static final long serialVersionUID = -324371107864944136L;

    private String errorCode;
    private String errorMessage;

    public ServiceException() {
        super();
    }

    public ServiceException(String errorCode) {
        super(errorCode);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(Throwable cause, String errorCode) {
        super(cause);
        this.errorCode = errorCode;
    }

    public ServiceException(String errorCode, String errorMessage) {
        super();
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public ServiceException(Throwable cause, String errorCode, String errorMessage) {
        super(cause);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
